package main;


import java.util.LinkedList;
import processes.Process;
import resources.Resource;

/**
 *
 * @author Ramunas
 */
public class Lists {
    
    private static LinkedList<Process> processes = new LinkedList<Process>();
    private static LinkedList<Resource> resources = new LinkedList<Resource>();
    

    /**
     * @return the processes
     */
    public static LinkedList<Process> getProcesses() {
        return processes;
    }
    
    public static Process getProcessById(Integer id){
        for(Process process : processes){
            if(process.getId() == id){
                return process;
            }
        }
        return null;
    }

    /**
     * @param aProcesses the processes to set
     */
    public static void setProcesses(LinkedList<Process> aProcesses) {
        processes = aProcesses;
    }

    /**
     * @return the resources
     */
    public static LinkedList<Resource> getResources() {
        return resources;
    }

    /**
     * @param aResources the resources to set
     */
    public static void setResources(LinkedList<Resource> aResources) {
        resources = aResources;
    }
        
}
